<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:composite="http://java.sun.com/jsf/composite"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui"
	xmlns:ui="http://java.sun.com/jsf/facelets">

<h:body>
	<ui:composition template="/WEB-INF/Facelets/template.xhtml">
		<ui:define name="content">

			<div id="content-locacao">

				<h:form>
					<p:growl id="growl" showDetail="true" />
					<p:fieldset legend="Dados do Cleinte" toggleable="true"
						toggleSpeed="500">
						<p:ajax event="toggle" update="growl" />
						<h:panelGrid columns="2" cellpadding="10">

							<p:outputLabel value="Nome:" />
							<p:inputText value="#{ClienteMB.cliente.nome}" maxlength="45"
								size="25" />

							<p:outputLabel value="Endereço:" />
							<p:inputText value="#{ClienteMB.cliente.endereco}" maxlength="45"
								size="25" />

							<p:outputLabel value="CPF/CNPJ" />
							<p:inputText value="#{ClienteMB.cliente.cpf_cnpj}" maxlength="45"
								size="25" />

							<p:outputLabel value="Cidade:" />
							<p:inputText value="#{ClienteMB.cliente.cidade}" maxlength="45"
								size="25" />

							<p:outputLabel value="UF:" />
							<p:inputText value="#{ClienteMB.cliente.uf}" maxlength="2"
								size="2" />

							<p:outputLabel value="Data de Cadastro:" />
							<p:inputText value="#{ClienteMB.cliente.dt_cadastro}"
								maxlength="2" size="2" />

							<p:commandButton value="Limpar" type="reset" />

						</h:panelGrid>
					</p:fieldset>

					<p:fieldset legend="Dados da Locação" toggleable="true"
						toggleSpeed="500">
						<p:ajax event="toggle" update="growl" />
						<h:panelGrid columns="2" cellpadding="10">

							<p:outputLabel value="KM Rodada:" />
							<p:inputText value="#{LocacaoMB.locacao.km_rodada}"
								maxlength="45" size="25" />

							<p:outputLabel value="Data da Locação" />
							<p:inputText value="#{LocacaoMB.locacao.dt_locacao}"
								maxlength="45" size="25" />

							<p:commandButton value="Limpar" type="reset" />
						</h:panelGrid>
					</p:fieldset>

					<p:fieldset legend="Dados do Veículo" toggleable="true"
						toggleSpeed="500">
						<p:ajax event="toggle" update="growl" />
						<h:panelGrid columns="2" cellpadding="10">

							<p:outputLabel value="Marca:" />
							<p:inputText value="#{MarcaMB.marca.nome}" maxlength="45"
								size="25" />

							<p:outputLabel value="Nome Veículo" />
							<p:inputText value="#{AutomovelMB.automovel.nome}" maxlength="45"
								size="25" />

							<p:outputLabel value="Modelo:" />
							<p:inputText value="#{AutomovelMB.automovel.modelo}"
								maxlength="45" size="25" />

							<p:commandButton value="Limpar" type="reset" />
							<p:commandButton value="Cadastrar" update="display"
								oncomplete="dialog.show()" action="#{LocacaoMB.Insert()}" />

						</h:panelGrid>

					</p:fieldset>
					<p:commandButton value="Voltar" action="lista-locacao" />




				</h:form>
			</div>





		</ui:define>
	</ui:composition>
</h:body>
</html>